﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Orange.Logistics.Models {
    public class Stock {
        [Key]
        [Column("Did"), MaxLength(20)]
        [Required(ErrorMessage = "*")]
        public string Did { get; set; }

        [Column("Memoryid"), MaxLength(20)]
        public string Memoryid { get; set; }

        [Column("Memorycard"), MaxLength(50)]
        public string Memorycard { get; set; }

        [Column("Stockinid"), MaxLength(20)]
        public string Stockinid { get; set; }

        [Column("Smanualno"), MaxLength(20)]
        public string Smanualno { get; set; }

        [Column("Recargoid"), MaxLength(20)]
        public string Recargoid { get; set; }

        [Column("Manualno"), MaxLength(20)]
        public string Manualno { get; set; }

        [Column("Customerid"), MaxLength(20)]
        public string Customerid { get; set; }

        [Column("Customername"), MaxLength(50)]
        public string Customername { get; set; }

        [Column("Conid"), MaxLength(20)]
        public string Conid { get; set; }

        [Column("Mncode"), MaxLength(20)]
        public string Mncode { get; set; }

        [Column("Proid"), MaxLength(20)]
        public string Proid { get; set; }

        [Column("Proname"), MaxLength(100)]
        public string Proname { get; set; }

        [Column("Brandname"), MaxLength(100)]
        public string Brandname { get; set; }

        [Column("Moname"), MaxLength(100)]
        public string Moname { get; set; }

        [Column("Maname"), MaxLength(100)]
        public string Maname { get; set; }

        [Column("Baname"), MaxLength(100)]
        public string Baname { get; set; }

        [Column("Hottoys")]
        public int? Hottoys { get; set; }

        [Column("Qunit"), MaxLength(100)]
        public string Qunit { get; set; }

        [Column("Wunit"), MaxLength(100)]
        public string Wunit { get; set; }

        [Column("Curinrpieces")]
        public int? Curinrpieces { get; set; }

        [Column("CurinWeight")]
        public decimal? CurinWeight { get; set; }

        [Column("Curoutrpieces")]
        public int? Curoutrpieces { get; set; }

        [Column("CuroutWeight")]
        public decimal? CuroutWeight { get; set; }

        [Column("Rpieces")]
        public int? Rpieces { get; set; }

        [Column("Weight")]
        public decimal? Weight { get; set; }

        [Column("Yrackid"), MaxLength(20)]
        public string Yrackid { get; set; }

        [Column("Yrackname"), MaxLength(50)]
        public string Yrackname { get; set; }

        [Column("Erackid"), MaxLength(20)]
        public string Erackid { get; set; }

        [Column("Erackname"), MaxLength(50)]
        public string Erackname { get; set; }

        [Column("Sackid"), MaxLength(20)]
        public string Sackid { get; set; }

        [Column("Sackname"), MaxLength(50)]
        public string Sackname { get; set; }

        [Column("Carno"), MaxLength(50)]
        public string Carno { get; set; }

        [Column("Sid"), MaxLength(20)]
        public string Sid { get; set; }

        [Column("Contactor"), MaxLength(20)]
        public string Contactor { get; set; }

        [Column("Remark"), MaxLength(255)]
        public string Remark { get; set; }

        [Column("Status"), MaxLength(2)]
        public string Status { get; set; }

        [Column("Stockintime")]
        public DateTime? Stockintime { get; set; }

        [Column("Createuser"), MaxLength(12)]
        public string Createuser { get; set; }

        [Column("Createtime")]
        public DateTime? Createtime { get; set; }

        [Column("Modifyuser"), MaxLength(12)]
        public string Modifyuser { get; set; }

        [Column("Modifytime")]
        public DateTime? Modifytime { get; set; }

        [Column("Ishavedet")]
        public int? Ishavedet { get; set; }

        [Column("Acceptanceid"), MaxLength(20)]
        public string Acceptanceid { get; set; }

        [Column("Acceptance"), MaxLength(50)]
        public string Acceptance { get; set; }

        [Column("Sourcedid"), MaxLength(20)]
        public string Sourcedid { get; set; }

        [Column("Origdid"), MaxLength(20)]
        public string Origdid { get; set; }

        public string Rackname { get { return Yrackname + Erackname + Sackname; } }

    }
}
